﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;

namespace Infrastructure.Sockets.models
{
    /// <summary>
    /// 状态
    /// </summary>
    public class StateObject
    {
        /// <summary>
        /// Client socket.
        /// </summary>
        public Socket WorkSocket;
        /// <summary>
        ///  Size of receive buffer.     
        /// </summary>
        public const int BufferSize = 10 * 1024 * 1024;
        /// <summary>
        ///  Receive buffer.     
        /// </summary>
        public byte[] Buffer = new byte[BufferSize];
        /// <summary>
        ///  Received data string.     
        /// </summary>
        public StringBuilder Sb = new StringBuilder();
        /// <summary>
        ///  Count bytes
        /// </summary>
        public int BytesRead;
        /// <summary>
        ///  Data string is endless
        /// </summary>
        public bool IsEndless;
    }
}
